package com.czxy.dao;

import com.czxy.domain.Product;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ProductMapper extends Mapper<Product> {




    @Select("select * from product  where  is_hot= 1 and pflag=0 limit 0,9")
    public List<Product> findHotProducts();


    @Select("select * from product where pflag = 0 order by pdate desc limit 0,9")
    public List<Product> findNewProducts();

    @Select("select * from product where cid = #{cid}")
    public  List<Product> findProductsByCid(@Param("cid") String cid);
}
